package com.lonty.intelligence.controller;

import com.lonty.intelligence.api.Result;
import com.lonty.intelligence.util.UUIDUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 陈璇
 * @Date 2020/4/17 10:39
 * @Version 1.0
 */
@RestController
@RequestMapping("app/web")
@Validated
@Api(tags = "Web接口", produces = "application/json")
public class WebController {

    @ApiOperation(value = "获取ID", httpMethod = "GET")
    @GetMapping("getId")
    public Result getId(){
        return Result.builder()
                .data(UUIDUtil.randomID())
                .build();
    }

}
